camera_get_view_mat


描述

此函数用来获得视野矩阵。此函数所返回的矩阵ID可用在其它的 矩阵函数 ,或用来设置其它摄像机的投影矩阵。(使用 camera_set_proj_mat)。注意,此函数通常用于那些使用camera_create()创建出来的摄像机,但也可用于那些在房间编辑器中(或使用 camera_create_view)创建出来的摄像机——在这种情况下,只有在给定摄像机在首次被用于可视区域时,函数返回的矩阵才可用。


语法:

camera_get_view_mat(camera_id)


参数:

参数 描述
camera_id 创建相机时返回的唯一相机 id 值


返回:

Matrix ID (real)


例如:

mat = camera_get_view_mat(camera_view[0]);

The above code gets the view matrix for the camera assigned to view port[0].


上一页: Cameras
下一页: camera_get_proj_mat
© Copyright YoYo Games Ltd. 2018 All Rights Reserved